/**
* Copyright (c) 2022 Beijing Jiaotong University
* PhotLab is licensed under [Open Source License].
* You can use this software according to the terms and conditions of the [Open Source License].
* You may obtain a copy of [Open Source License] at: [https://open.source.license/]
* 
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* 
* See the [Open Source License] for more details.
* 
* Author: Zhenjie Wei
* Created: Mar. 23, 2023
* Supported by: National Key Research and Development Program of China
*/

@import './cmp_message.scss';

@mixin phot-active-device-center {
    height: 100%;
    flex: 1;
    min-width: 0;
    position: relative;
    box-sizing: border-box;
    .preview-content {
        flex: 1;
        box-sizing: border-box;
        position: absolute;
        top: 0;
        left: 0;
        right: -1px;
        bottom: 29px;
        .preview-list {
            height: 100%;
            width: 100%;
            .view-content {
                height: 100%;
                width: 100%;
                .view-list {
                    display: flex;
                    justify-content: flex-start;
                    align-items: flex-start;
                    flex-wrap: wrap;
                    height: 100%;
                    width: 100%;
                    .view-item {
                        height: 67.3%;
                        width: 50%;
                        .view-container {
                            width: 100%;
                            height: 100%;
                            box-sizing: border-box;
                            position: relative;
                            &:nth-child(2n-1) {
                                border-right: 1px solid $border-lighter_light;
                            }
                            &:nth-child(1), &:nth-child(2) {
                                border-bottom: 1px solid $border-lighter_light;
                            }
                            .view-item__header {
                                height: 24px;
                                width: 100%;
                                background-color: $border_light;
                                font-size: 12px;
                                box-sizing: border-box;
                                padding-left: 20px;
                                line-height: 24px;
                                display: flex;
                                justify-content: flex-start;
                                align-items: center;
                                .inline-block {
                                    display: flex;
                                    justify-content: center;
                                    align-items: center;
                                }
                            }
                            .view-item__content {
                                box-sizing: border-box;
                                display: flex;
                                justify-content: center;
                                align-items: center;
                                position: absolute;
                                top: 24px;
                                left: 0;
                                right: 0;
                                bottom: 0;
                                overflow: hidden;
                                img {
                                    width: 70%;
                                    cursor: pointer;
                                }
                                .pui-btn {
                                    position: absolute;
                                    top: 20px;
                                    left: 20px;
                                }
                            }
                        }
                    }
                }
            }
        }
        &.fiber_device {
            .preview {
                width: 100%;
                height: 100%;
                display: flex;
                justify-content: flex-start;
                align-items: flex-start;
                flex-direction: column;
                .project-name {
                    height: 30px;
                    width: 100%;
                    flex-shrink: 0;
                    background-color: $bg-fill_light;
                    display: flex;
                    justify-content: flex-start;
                    align-items: center;
                    box-sizing: border-box;
                    padding-left: 20px;
                    font-size: 14px;
                    
                }
                .content {
                    flex: 1;
                    width: 100%;
                    display: flex;
                    justify-content: center;
                    align-items: flex-start;
                    padding: 50px 50px 0;
                    box-sizing: border-box;
                    img {
                        width: 100%;
                    }
                }
            }
        }
    }
    .log-content {
        @include phot-active-device-message;
        box-sizing: border-box;
    }
}

@mixin phot-active-device-center-dark {
    // border-top: 1px solid $border_dark;
    .pui-tabs {
        border-bottom: 1px solid #fff;
        .pui-tabs_content {
            background: $bg-tool_dark;
            .pui-tab {
                &:hover {
                    .pui-tab_name {
                    }
                }
                &.active-tab {
                    &:nth-child(3) {
                    }
                }
            }
        }
    }
    .preview-content {
        .file-content {
        }
    }
    .log-content {
        @include phot-active-device-message-dark;
    }
}
